; Bugs?: If you find a problem with this file, use the Apple Bug Reporter
; stack. Include the file and version information (from above)
; in the problem description and send to:
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__QUICKDRAWTEXT__') = 'UNDEFINED' THEN
__QUICKDRAWTEXT__ SET 1
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
; include 'ConditionalMacros.a' ;
IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
include 'MixedMode.a'
ENDIF
; CharToPixel directions
leftCaret EQU 0 ;Place caret for left block
rightCaret EQU -1 ;Place caret for right block
hilite EQU 1 ;Direction is SysDirection
smLeftCaret EQU 0 ;Place caret for left block - obsolete
smRightCaret EQU -1 ;Place caret for right block - obsolete
smHilite EQU 1 ;Direction is TESysJust - obsolete
;Constants for styleRunPosition argument in PortionLine, DrawJustified,
; MeasureJustified, CharToPixel, and PixelToChar.
onlyStyleRun EQU 0 ; This is the only style run on the line
leftStyleRun EQU 1 ; This is leftmost of multiple style runs on the line
rightStyleRun EQU 2 ; This is rightmost of multiple style runs on the line
middleStyleRun EQU 3 ; There are multiple style runs on the line and this
; is neither the leftmost nor the rightmost.
smOnlyStyleRun EQU 0 ; obsolete
smLeftStyleRun EQU 1 ; obsolete
smRightStyleRun EQU 2 ; obsolete
smMiddleStyleRun EQU 3 ; obsolete
; type for styleRunPosition parameter in PixelToChar etc.
; typedef short JustStyleCode
; typedef short FormatOrder[1]
; typedef FormatOrder *FormatOrderPtr
OffPair RECORD 0
offFirst ds.w 1 ; offset: $0 (0)
offSecond ds.w 1 ; offset: $2 (2)
sizeof EQU * ; size: $4 (4)
ENDR
; typedef struct OffPair OffPair
; typedef OffPair OffsetTable[3]
;
; pascal short Pixel2Char(Ptr textBuf, short textLen, short slop, short pixelWidth, Boolean *leadingEdge)
;
IF ¬ GENERATINGCFM THEN
Macro
_Pixel2Char
dc.w $2F3C
dc.w $820E
dc.w $0014
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION Pixel2Char
ENDIF
;
; pascal short Char2Pixel(Ptr textBuf, short textLen, short slop, short offset, short direction)
;
IF ¬ GENERATINGCFM THEN
Macro
_Char2Pixel
dc.w $2F3C
dc.w $820C
dc.w $0016
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION Char2Pixel
ENDIF
;
; pascal short PixelToChar(Ptr textBuf, long textLength, Fixed slop, Fixed pixelWidth, Boolean *leadingEdge, Fixed *widthRemaining, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF ¬ GENERATINGCFM THEN
Macro
_PixelToChar
dc.w $2F3C
dc.w $8222
dc.w $002E
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION PixelToChar
ENDIF
;
; pascal short CharToPixel(Ptr textBuf, long textLength, Fixed slop, long offset, short direction, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF ¬ GENERATINGCFM THEN
Macro
_CharToPixel
dc.w $2F3C
dc.w $821C
dc.w $0030
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION CharToPixel
ENDIF
;
; pascal void DrawJustified(Ptr textPtr, long textLength, Fixed slop, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF ¬ GENERATINGCFM THEN
Macro
_DrawJustified
dc.w $2F3C
dc.w $8016
dc.w $0032
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION DrawJustified
ENDIF
;
; pascal void MeasureJustified(Ptr textPtr, long textLength, Fixed slop, Ptr charLocs, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF ¬ GENERATINGCFM THEN
Macro
_MeasureJustified
dc.w $2F3C
dc.w $801A
dc.w $0034
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION MeasureJustified
ENDIF
;
; pascal Fixed PortionLine(Ptr textPtr, long textLen, JustStyleCode styleRunPosition, Point numer, Point denom)
;
IF ¬ GENERATINGCFM THEN
Macro
_PortionLine
dc.w $2F3C
dc.w $8412
dc.w $0036
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION PortionLine
ENDIF
;
; pascal void HiliteText(Ptr textPtr, short textLength, short firstOffset, short secondOffset, OffsetTable offsets)
;
IF ¬ GENERATINGCFM THEN
Macro
_HiliteText
dc.w $2F3C
dc.w $800E
dc.w $001C
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION HiliteText
ENDIF
;
; pascal void DrawJust(Ptr textPtr, short textLength, short slop)
;
IF ¬ GENERATINGCFM THEN
Macro
_DrawJust
dc.w $2F3C
dc.w $8008
dc.w $001E
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION DrawJust
ENDIF
;
; pascal void MeasureJust(Ptr textPtr, short textLength, short slop, Ptr charLocs)
;
IF ¬ GENERATINGCFM THEN
Macro
_MeasureJust
dc.w $2F3C
dc.w $800C
dc.w $0020
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION MeasureJust
ENDIF
;
; pascal Fixed PortionText(Ptr textPtr, long textLength)
;
IF ¬ GENERATINGCFM THEN
Macro
_PortionText
dc.w $2F3C
dc.w $8408
dc.w $0024
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION PortionText
ENDIF
;
; pascal long VisibleLength(Ptr textPtr, long textLength)
;
IF ¬ GENERATINGCFM THEN
Macro
_VisibleLength
dc.w $2F3C
dc.w $8408
dc.w $0028
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION VisibleLength
ENDIF
;
; pascal void GetFormatOrder(FormatOrderPtr ordering, short firstFormat, short lastFormat, Boolean lineRight, StyleRunDirectionUPP rlDirProc, Ptr dirParam)
;
IF ¬ GENERATINGCFM THEN
Macro
_GetFormatOrder
dc.w $2F3C
dc.w $8012
dc.w $FFFC
dc.w $A8B5
EndM
ELSE
IMPORT_CFM_FUNCTION GetFormatOrder
ENDIF
IF OLDROUTINENAMES THEN
ENDIF
FontInfo RECORD 0
ascent ds.w 1 ; offset: $0 (0)
descent ds.w 1 ; offset: $2 (2)
widMax ds.w 1 ; offset: $4 (4)
leading ds.w 1 ; offset: $6 (6)
sizeof EQU * ; size: $8 (8)
ENDR
; typedef struct FontInfo FontInfo
; typedef short FormatStatus
;
; pascal void TextFont(short font)
;
IF ¬ GENERATINGCFM THEN
_TextFont: OPWORD $A887
ELSE
IMPORT_CFM_FUNCTION TextFont
ENDIF
;
; pascal void TextFace(Style face)
;
IF ¬ GENERATINGCFM THEN
_TextFace: OPWORD $A888
ELSE
IMPORT_CFM_FUNCTION TextFace
ENDIF
;
; pascal void TextMode(short mode)
;
IF ¬ GENERATINGCFM THEN
_TextMode: OPWORD $A889
ELSE
IMPORT_CFM_FUNCTION TextMode
ENDIF
;
; pascal void TextSize(short size)
;
IF ¬ GENERATINGCFM THEN
_TextSize: OPWORD $A88A
ELSE
IMPORT_CFM_FUNCTION TextSize
ENDIF
;
; pascal void SpaceExtra(Fixed extra)
;
IF ¬ GENERATINGCFM THEN
_SpaceExtra: OPWORD $A88E
ELSE
IMPORT_CFM_FUNCTION SpaceExtra
ENDIF
;
; pascal void DrawChar(asciichar ch)
;
IF ¬ GENERATINGCFM THEN
_DrawChar: OPWORD $A883
ELSE
IMPORT_CFM_FUNCTION DrawChar
ENDIF
;
; pascal void DrawString(ConstStr255Param s)
;
IF ¬ GENERATINGCFM THEN
_DrawString: OPWORD $A884
ELSE
IMPORT_CFM_FUNCTION DrawString
ENDIF
;
; pascal void DrawText(const void *textBuf, short firstByte, short byteCount)
;
IF ¬ GENERATINGCFM THEN
_DrawText: OPWORD $A885
ELSE
IMPORT_CFM_FUNCTION DrawText
ENDIF
;
; pascal short CharWidth(asciichar ch)
;
IF ¬ GENERATINGCFM THEN
_CharWidth: OPWORD $A88D
ELSE
IMPORT_CFM_FUNCTION CharWidth
ENDIF
;
; pascal short StringWidth(ConstStr255Param s)
;
IF ¬ GENERATINGCFM THEN
_StringWidth: OPWORD $A88C
ELSE
IMPORT_CFM_FUNCTION StringWidth
ENDIF
;
; pascal short TextWidth(const void *textBuf, short firstByte, short byteCount)